import request from '@/utils/request'

// 获取已结束的考试列表
export function getFinishedExams(schoolNumber, current, size) {
  return request({
    url: `/dashboard/certificate/exam/list/${schoolNumber}`,
    method: 'get',
    params: {
      current,
      size
    }
  })
}

// 获取考试详情
export function getExamDetail(examId) {
  return request({
    url: `/dashboard/certificate/exam/${examId}`,
    method: 'get'
  })
}

// 预览证书颁发
export function previewCertificateIssuance(params) {
  return request({
    url: '/dashboard/certificate/preview/issue',
    method: 'get',
    params
  })
}

// 颁发证书
export function issueCertificates(data) {
  return request({
    url: '/dashboard/certificate/issue',
    method: 'post',
    data
  })
}

// 获取学生证书列表
export function getStudentCertificates(params) {
  return request({
    url: '/api/certificate/student/certificate/list',
    method: 'get',
    params
  })
} 